package com.ai.dmc.index.web.service;

import com.ai.frame.bean.OutputObject;

/**
 * OsCache服务接口
 */
public interface ICacheService {
	
	/**
	 * 放入缓存
	 * 
	 * @param cacheKey key
	 * @param outputObject value
	 * @return
	 */
	boolean put2Cache(String cacheKey, OutputObject outputObject);

	/**
	 * 放入缓存
	 * 
	 * @param cacheKey key
	 * @param outputObject value
	 * @param expiry 过期时间(s)
	 * @return
	 */
	boolean put2Cache(String cacheKey, OutputObject outputObject,
			long expiry);

	/**
	 * 从缓存中获取信息
	 * 
	 * @return
	 */
	OutputObject getFromCache(String cacheKey);
	
	/**
	 * 清除全部缓存信息
	 */
	void removeAll();
}
